
package com.kweative.model.test.model;

import com.kweative.model.Entity;
import com.kweative.model.apt.annotation.TableDeclaration;
import com.kweative.model.exception.StructureException;
import com.kweative.model.column.ColumnText;
import com.kweative.model.relation.RelationMany2Many;

/**
 *
 * @author henrik
 */
@TableDeclaration
public class UserGroup extends Entity<UserGroupRow,UserGroup,BasicSchema> {
    public ColumnText<UserGroup> Name;
    public RelationMany2Many<User,UserGroup> Users;

    public UserGroup() {
        super();
    }

    @Override
    protected void makeStructure() throws StructureException {
        Name = addColumn(new ColumnText<UserGroup>(ColumnText.Size.TITLE));
        Users = addRelation(new RelationMany2Many<User,UserGroup>(getSchema().User));
    }
}
